import { request, METHOD } from "@/utils/request";
import {
  ROLE,
  ONEROLE,
  ADDROLE,
  DELROLE,
  UPDATEROLE,
  ROLEGSAVEAUTH,
  ROLEGETAUTH,
  ALLROLES
} from "./api";

export function list(params) {
  return request(ROLE, METHOD.GET, params);
}
export function del(params) {
  return request(DELROLE, METHOD.POST, params);
}
export function update(params) {
  return request(UPDATEROLE, METHOD.POST, params);
}
export function add(params) {
  return request(ADDROLE, METHOD.POST, params);
}
export function findById(params) {
  return request(ONEROLE, METHOD.GET, params);
}
export function getAuth(params) {
  return request(ROLEGETAUTH, METHOD.GET, params);
}
export function saveAuth(params) {
  return request(ROLEGSAVEAUTH, METHOD.POST, params);
}
export function getAllAuth(params) {
  return request(ALLROLES, METHOD.GET, params);
}
